<#import "../macro/components.ftl" as components/>
<#include "../macro/layout_default.ftl"/>

<@head>
<link rel="stylesheet" href="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.css"/>
</@head>
<@body>
<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/moment.min.js"></script>
<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.js"></script>
<script src="/misc/app/js/salesman_scanlog.js"></script>
</@body>
<@layout_default>
<div class="box">
    <div class="box-header with-border">
        <form name="form_query" class="form-inline" action="/salesmanScan/list">
            <input type="hidden" name="timeLimitStart" value="${timeLimitStart!}"/>
            <input type="hidden" name="timeLimitEnd" value="${timeLimitEnd!}"/>
            <div class="input-group">
                <div class="input-group-addon">二维码编号</div>
                <input type="text" class="form-control" style="width: 260px" name="qrcode" value="${qrcode!}" placeholder="二维码编号"/>
            </div>
            <div class="input-group">
                <div class="input-group-addon">促销员</div>
                <input type="text" class="form-control" style="width: 260px" name="saleman" value="${saleman!}" placeholder="姓名、手机号"/>
            </div>
             <div class="input-group">
                <div class="input-group-addon">产品</div>
                <input type="text" class="form-control" style="width: 260px" name="proName" value="${proName!}" placeholder="产品名称、产品编码"/>
            </div>
            <div class="input-group">
                <div class="input-group-addon">扫码时间</div>
                <input type="text" class="form-control" id="timelimitstart_and_timelimitstart" style="width: 200px"/>
            </div>
            <button type="submit" class="btn btn-warning"><i class="fa fa-search"></i> 查询</button>
        </form>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <table class="table table-striped table-hover">
            <tr>
                <th>二维码编号</th>
                <th>产品名称</th>
                <th>产品编码</th>
                <th>促销员姓名</th>
                <th>手机号</th>
                <th>状态</th>
                <th>规则状态</th>
                <th>提现状态</th>
                <th>扫码时间</th>
            </tr>
            <#if (salescanlog.result?size > 0)>
                <#list salescanlog.result as item>
                    <tr>
                        <td>${item.id}</td>
                        <td>${item.proname}</td>
                        <td>${item.procode}</td>
                        <td>${item.salesname}</td>
                        <td>${item.phone}</td>
                        <td>${item.state}</td>
                        <td>${item.payrulesate}</td>
                        <td>${item.txstate}</td>
                        <td>${item.c_time?number_to_datetime?string("yyyy-MM-dd HH:mm:ss")}</td>
                    </tr>
                </#list>
            <#else>
                <tr>
                    <td class="text-center text-muted" colspan="5"><i class="fa fa-info-circle"></i> 没有记录</td>
                </tr>
            </#if>
        </table>
        <table class="table table-striped table-hover">
        	<tr>
        		<td colspan="13" style="text-align:right;background-color:white;">
        			<a href="javascript:void(0);" name="btn_export"><i class="glyphicon glyphicon-save"></i> 数据导出</a>
        		</td>
        	</tr>
        </table>
    </div>
    <!-- /.box-body -->
    <div class="box-footer text-center">
        <@components.pagination "/salesmanScan/list?qrcode=${qrcode!}&timeLimitStart=${timeLimitStart!}&timeLimitEnd=${timeLimitEnd!}&saleman=${saleman!}&proName=${proName!}&page=$page",salescanlog.page,salescanlog.pageTotal/>
    </div>
</div>

</@layout_default>